package com.jzr.task.db1.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.context.annotation.Primary;

import java.util.Date;

@Primary
public interface MySysJobMapper extends TSysJobMapper {
    @Select("select id from t_sys_job where id=#{id}")
    Integer getIdByJobName(String jobName);

    @Select("select last_success_date from t_sys_job where id=#{id}")
    Date getLastSuccessDate(Integer id);

    @Update("update t_sys_job set last_success_date=#{lastSuccessDate} where id=#{id}")
    Integer setLastSuccessDate(Integer id, Date lastSuccessDate);
}
